{
	template:`
    <m-page @back="back" title="订单信息">
        <m-top></m-top>
        <m-title>订单信息<template #action>订单编号：{{model.orderNo}}</template></m-title>
        <m-card>
            <div class="cu-form-group">
                <div class="cu-tag radius" :class="'bg-'+model.member.level.color">{{model.member.level.name}}</div>
                <m-form-item>
                    <div class="padding-left-sm">
                        <span class="text-sm" :class="'text-'+model.member.level.color">优惠{{model.member.level.discount}}%</span>
                        {{model.member.realName}}
                        <span class="text-sm">{{model.member.phoneNum}}</span>
                        <div>
                            <small>余额</small><span class="text-red">{{formatNumber(model.member.balance-model.member.freeze,'#,##0.00')}}</span><small>元</small>
                        </div>
                    </div>
                </m-form-item>
            </div>
            <div class="cu-form-group">
                <div class="title">服务员工</div>
                <m-form-item>
                    <div>{{model.serveUser.realName}} <span class="text-sm">{{model.serveUser.phoneNum}}</span></div>
                </m-form-item>
            </div>
            <div class="cu-form-group">
                <div class="title">订单金额</div>
                <div class="flex-sub">{{formatAmount(model.orderAmount)}}元</div>
                <div>会员优惠{{formatAmount(model.preferentialAmount)}}元</div>
            </div>
            <div class="cu-form-group">
                <div class="title">其他金额</div>
                <m-input-number :operable="false" v-model="model.otherAmount" placeholder="请输入其他金额"></m-input-number>
                <div>元</div>
            </div>
            <div class="cu-form-group">
                <div v-if="model.memberDayAmount" class="text-sm text-right">
                    <div>会员日再优惠{{dayRate}}%</div>
                    <div>{{formatAmount(model.memberDayAmount)}}元</div>
                </div>
                <div class="flex-sub text-right">
                    实付金额：
                    <span class="text-red text-lg">{{formatAmount(model.payAmount)}}</span>
                    元
                </div>
            </div>
            <div class="cu-form-group">
                <div class="title">付款类型</div>
                <m-dict-option :operable="false" class="flex-sub" v-model="model.payType" type="member.order.model.OrderInfo!payType"></m-dict-option>
            </div>
            <div v-if="pays.length>1" class="cu-form-group">
                <m-grid :col="2" class="flex-sub">
                    <m-desc v-for="pay in pays" :innerClass="'padding-lr-sm padding-tb-xs radius light bg-'+(pay.payAmount>0?'blue':'red')">
                        <div class="flex" style="line-height:20px;">
                            <div class="padding-right-xs">{{dict('member.order.model.OrderInfo!payType',pay.payType)}}</div>
                            <m-input-number :operable="false" v-model="pay.payAmount" placeholder="请输入金额"></m-input-number>
                            <div>元</div>
                        </div>
                    </m-desc>
                </m-grid>
            </div>
            <div class="cu-form-group">
                <div class="title">账期</div>
                <m-select-date :operable="false" class="flex-sub" v-model="model.accountDate" placeholder="请选择账期"></m-select-date>
            </div>
            <div class="cu-form-group">
                <div class="title">备注</div>
                <m-input type="textarea" :operable="false" v-model="model.remark" placeholder="请输入备注"></m-input>
            </div>
        </m-card>
        <m-title>订单明细</m-title>
        <m-top></m-top>
        <m-card join v-for="(item,key) in list">
            <div class="flex padding-sm align-center">
                <div class="cu-tag radius" :class="'bg-'+item.serve.type.color">{{item.serve.type.name}}</div>
                <div class="flex-sub padding-lr-sm">
                    {{item.serve.title}}
                    <div class="text-sm text-gray">
                        原价{{formatAmount(item.price)}}元
                        <span v-if="item.discount" class="padding-bottom-xs text-blue">优惠{{item.discount}}%</span>
                    </div>
                </div>
                <div class="text-sm text-right">
                    ×{{formatAmount(item.num)}}
                    <div>
                        <span class="text-red text-lg">{{formatAmount(item.total)}}</span>元
                    </div>
                </div>
            </div>
            <div class="flex text-sm">
                <div class="flex-sub padding-lr-sm padding-bottom-sm">{{item.serve.description}}</div>
            </div>
        </m-card>
        <m-title>登记确认信息</m-title>
        <m-card>
            <div class="padding-xs flex align-center">
                <m-grid :col="2" class="flex-sub">
                    <m-desc title="登记员工">{{model.inputUser.realName}}<small>{{model.inputUser.phoneNum}}</small></m-desc>
                    <m-desc title="登记时间">{{formatDate(model.inputDate,'yyyy-MM-dd HH:mm')}}</m-desc>
                    <m-desc title="确认员工">{{model.confirmUser.realName}}<small>{{model.confirmUser.phoneNum}}</small></m-desc>
                    <m-desc title="确认时间">{{formatDate(model.confirmDate,'yyyy-MM-dd HH:mm')}}</m-desc>
                </m-grid>
            </div>
        </m-card>
    </m-page>
	`,
	props: ['param','parentVue'],
	data:function(){
		return {
		    model:{member:{realName:'*',level:{}},serveUser:{},inputUser:{},inputStore:{},confirmUser:{}},
		    list:[],
		    pays:[]
		};
	},
	mounted(){
        this.requestData('action/member/orderInfo/getInfo',
            {oid:this.param.oid},
            (data)=>{
                if(data.code==0){
                    this.model=data.model;
                    this.list=data.list;
                    this.pays=data.pays;
                }else{
                    this.remind().error(data.msg);
                }
            }
        );
	},
	methods:{
	}
}